package com.jar.exercise.坑爹的面试题;

/**
 *
 */
public class Demo6 {
	public static void main(String[] args) {
		String s1 = "abc";
		String s2 = "abc";
		System.out.println(s1.equals(s2));
		StringBuffer sb1 = new StringBuffer("abc");
		StringBuffer sb12 = new StringBuffer("abc");
		System.out.println(sb1.equals(sb12));// StringBuffer 没有重写Object 的equals方法
		//所以为 false

		//如何比较可变字符串？ sb1.toString().equals()
	}
}
